package message.util;

import java.util.HashMap;
import java.util.Map;

public class MatchMap<E, T> {
	
	private Map<E, T> setf;
	private Map<T, E> setl;
	
	public MatchMap() {
		this.setf = new HashMap<>();
		this.setl = new HashMap<>();
	}
	
	public T getLater(E e) {
		return setf.get(e);
	}
	
	public E getFormer(T t) {
		return setl.get(t);
	}
	
	public void match(E e, T t) {
		setf.put(e, t);
		setl.put(t, e);
	}
	
}
